package com.crane.oss.enums;

/**
 * @author zhenxing.pi
 */

public enum UserTypeEnum {
    /**
     * 用户类型
     */
    SUPER_ADMIN(0, "超级管理员"),

    SYSTEM_ADMIN(1, "系统管理员"),

    COMMON_USER(9, "普通管理员");

    private Integer type;

    private String remark;

    private UserTypeEnum(Integer type, String remark) {
        this.type = type;
        this.remark = remark;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }


    public static String getUserTypeName(Integer type) {
        String result = "";
        for (UserTypeEnum userTypeEnum : UserTypeEnum.values()) {
            if (null != type && userTypeEnum.getType() == type) {
                return userTypeEnum.getRemark();
            }
        }
        return result;
    }

}
